<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:py="http://genshi.edgewall.org/"
	xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master.html" />
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"
	py:replace="''" />
</head>
<py:def function="portlet_action()">
	${portlet_action_invoices()}
</py:def>
<body id="document" class="tab-grey ">
<py:def function="delete(obj, var_name='proforma')">
<form  method="get" name="invoice_del_form"
	id="invoice_del_form" action="${tg.url('delete')}">
	<input type="hidden" name="id" value="${obj.invoice_id}" />
	<input type="hidden" name="var" value="${var_name}" />
	<input id="actions.del" name="actions.remove" value="Remove"
		class="button" type="submit" />
</form>
</py:def>
<div id="view">
<h2>${this.mapper_general['proformas']}</h2>
<table class="listing">
	<thead>
            	<tr>
                	<th py:for="col in this.iterator_invoice">${this.mapper_invoice[col]}</th>
            	</tr>
	</thead>
	<tbody>
		<tr py:for="invoice in this.pproformas">
			<td><a
				href="${tg.url('show',id=invoice.invoice_id, var='proforma')}">${invoice['number']}</a></td>
			<td>${invoice.customer.vat_code}</td>
			<td>${invoice.customer.company_name}</td>
			<td>${invoice.tot} ${invoice.currency}</td>
			<td>${invoice.gross} ${invoice.currency}</td>
			<td>${this.date_i18n(invoice.created)}</td>
			<td>${delete(invoice, var_name='proforma')}</td>
		</tr>
	</tbody>
</table>
<h2>${this.mapper_general['invoices']}</h2>
<table class="listing">
	<thead>
            	<tr>
                	<th py:for="col in this.iterator_invoice">${this.mapper_invoice[col]}</th>
            	</tr>
	</thead>
	<tbody>
		<tr py:for="invoice in this.pinvoices">
			<td><a
				href="${tg.url('show',tgparams=dict(id=invoice.invoice_id))}">${invoice['number']}</a></td>
			<td>${invoice.customer.vat_code}</td>
			<td>${invoice.customer.company_name}</td>
			<td>${invoice.tot} ${invoice.currency}</td>
			<td>${invoice.gross} ${invoice.currency}</td>
			<td>${this.date_i18n(invoice.created)}</td>
			<td>${delete(invoice, var_name='invoice')}</td>
		</tr>
	</tbody>
</table>
</div>
</body>
</html>
